<template>
  <view class="content">
    <!-- <swiper :indicator-dots="true" :vertical="true" :interval="3000" :duration="1000" class="zade">
			<swiper-item v-for="item,index in list" :key="index">
				<image
					:src="item.src"
					mode=""
				/>
				
				<view class="ce">
					<text>是的</text>
					<view>不知道</view>
				</view>
			</swiper-item>
			
		</swiper>  -->
    <!-- <image
			src="../../static/logo.png"
			mode="scaleToFill"
		/>
		<image
			src="../../static/logo.png"
			mode="scaleToFill"
		/> -->

    <!-- <text>你好</text>
		<text>你好</text> -->
    <!-- <button  @click="goShare">分享</button>
	<uni-popup ref="sharepopup" type="bottom">
        <share-btn :sharedataTemp="sharedata"></share-btn>
    </uni-popup> -->
	<!-- <view @click="get">点击生成二维码</view>
	<uni-popup ref="sharepopup" type="center"> -->
    <!-- <view @click="save" > -->
		<!-- <text>点击图片保存</text> -->
		<!-- <view style="text-align:center">点击图片保存</view>
      <uqrcode ref="uQRCode"  :text="src" fileType complete  /> -->
      <!-- <button >保存</button> -->
    <!-- </view> -->
	<!-- </uni-popup> --> -->
	<view @click="showQrcode">生成</view>
  <navigator
    url="/pages/home/index"
    open-type="navigate"
    hover-class="navigator-hover"
  >
    跳转
  </navigator>
  <button type="primary"  @click="getPhoneNumber" >登录</button>
  <view>声明</view>
    <view>啥</view>
	<uni-popup ref="sharepopup" type="center" >
	<view style="margin: 40upx;" @click="save1">
  <view>效果如何</view>
  <view>如何做到得</view>
  什么样得错误
		<!-- <view style="text-align:center;height:80rpx;background-color:#ffffff">点击图片保存</view> -->
		<view style="text-align:center">点击图片保存</view>
    
            <ayQrcode ref="qrcode" :is_themeImg="true" :modal="modal_qr" h_w_img="80" :themeImg="themeImg" :url="url1" @hideQrcode="hideQrcode" :height="300" :width="300" />
          
        </view>
		</uni-popup>
    <button @click="gome">再次跳转</button>
  </view>
  
</template>

<script>
// import uqrcode from '../../components/uqrcode/uqrcode'
import ayQrcode from "@/components/ay-qrcode/ay-qrcode.vue"
 import uniPopup from '../../components/uni-popup/uni-popup';

export default {
  components: {
    uniPopup,
    // uqrcode
	ayQrcode
  },

  data () {
    return {
		src:'http://app.xiaobaizhuli.com/function-page/competition/h5_competition_share/?dataUuid=4?dataUuid=4?dataUuid=4',
		//二维码相关参数
                modal_qr: false,
                url1: 'https://pixabay.com/images/search/?order=ec', // 要生成的二维码值
                
      title: 'Hello',
	  show:false,
	  themeImg:'../../static/seach.png',
      list: [
        { src: '../../static/logo.png' },
        { src: '../../static/logo.png' },
        { src: '../../static/logo.png' }
      ],
     
    }
  },
  onLoad () {},
  methods: {
  async  getPhoneNumber(e){
        const [err, res] = await uni.getUserProfile({
        desc: '为了更好的为您服务~'
      })
      console.log(err,res);
    },
	get(){
		this.show=true
		this.$refs.sharepopup.open();
	},
    save () {
      this.$refs.uQRCode.save({
        success: res => {
          console.log(res)
        }
      })
    },
    gome(){
      uni.navigateTo({ url: '/pages/me/index' })
    },
	
            // 展示二维码
            showQrcode() {
				this.$refs.sharepopup.open();
                let _this = this;
                this.modal_qr = true;
                // uni.showLoading()
                setTimeout(function() {
                    // uni.hideLoading()
                    _this.$refs.qrcode.crtQrCode()
                }, 50)
            },
            //传入组件的方法
            hideQrcode() {
                this.modal_qr = false;
            },
			save1(){
				this.$refs.qrcode.saveImage()
			}
  }
}
</script>

<style lang="scss">
.content {
  image {
    width: 100rpx;
    height: 100rpx;
  }
  //   display: flex;
  //   flex-direction: column;
  //   align-items: center;
  //   justify-content: center;
}

.ce {
  position: fixed;
  z-index: 99;
  font-size: 50rpx;
  top: 150rpx;
}
.zade {
  height: 100vh;
}
</style>
